package aom.ju.ss.view.user.shop.management

import aom.ju.ss.R
import aom.ju.ss.databinding.ShopMangerActivityBinding
import aom.ju.ss.databinding.ShopMangerChildActivityBinding
import aom.ju.ss.mode.ShopShopInfoMode
import aom.ju.ss.mode.ShopShopInfoModeData
import aom.ju.ss.utils.data
import aom.ju.ss.utils.http.LP_API.shop_info
import aom.ju.ss.utils.http.OKHttpUtils
import aom.ju.ss.utils.show
import aom.ju.ss.utils.start
import aom.ju.ss.view.base.BaseActivity
import aom.ju.ss.view.user.shop.management.freightTemplate.ShippingTemplateSettings
import com.google.gson.Gson

/**
 * 店铺管理
 */
class ShopMangerChildActivity : BaseActivity() {
    private lateinit var binding: ShopMangerChildActivityBinding
    override fun init() {
        binding = viewBinding as ShopMangerChildActivityBinding

        val mode = Gson().fromJson(data, ShopShopInfoModeData::class.java)
        binding.info = mode
        binding.address.setOnClickListener {
            start(ReturnAddressList::class.java)
        }
        binding.templet.setOnClickListener {
            start(ShippingTemplateSettings::class.java)
        }
        binding.video.setOnClickListener {
            start(VideoListActivity::class.java)
        }
    }

    override fun ok(jsonString: String, httpTY: String) {
        super.ok(jsonString, httpTY)
        val mode = Gson().fromJson(jsonString, ShopShopInfoMode::class.java)

    }

    override fun error(e: String, jsonString: String, httpTY: String) {
        super.error(e, jsonString, httpTY)
        e.show
    }

    override val lay: Int = R.layout.shop_manger_child_activity

}